{% set teacher = data('PromotedTeacher',{'count':1}) %}

<div class="es-box">
    <h2>{{ config.title|default(config.defaultTitle) }}</h2>
    {% if teacher %}
    <div class="promot-teacher">

      <a href="{{ path('user_show', {id:teacher.id}) }}"><img src="{{ file_path(teacher.mediumAvatar, 'avatar.png') }}" class="img-circle avatar"></a>

      <a class="nickname" href="{{ path('user_show', {id:teacher.id}) }}">{{ teacher.nickname }}</a>

      <span>{{ teacher.title }}</span>

      <p>{{ teacher.about|plain_text(100) }}</p>
      
    </div>
  {% else %}
    <div class="empty">还没有推荐教师</div>
{% endif %}
</div>